// vue router
import {createRouter, createWebHashHistory} from "vue-router"

const routes = [
    {
        path: "/",
        redirect: "/main"
    },
    {
        path: "/mon",
        component: () => import("@/views/MonitorPage.vue")

    },
    {
        path: "/main",
        component: () => import("@/layout/dvmain/Layout.vue"),
        children: [
            {
                path: "/main",
                redirect: "/main/index"
            },
            {
                path: "/main/index",
                name: "main-index-page",
                components: {
                    "view-lt" : () => import("@/components/main/index/BriefViewResource.vue"),
                    "view-lm" : () => import("@/components/main/index/BriefViewService.vue"),
                    "view-lb" : () => import("@/components/main/index/BriefViewMonitor.vue"),
                    "view-rt" : () => import("@/components/main/index/BriefViewOperation.vue"),
                    "view-rm" : () => import("@/components/main/index/BriefViewSecurity.vue"),
                    "view-rb" : () => import("@/components/main/index/BriefViewGuard.vue")
                }
            },
            {
                path: "/main/op",
                name: "main-operation-page",
                components: {
                    "view-lt" : () => import("@/components/main/op/BriefViewStatus.vue"),
                    "view-lb" : () => import("@/components/main/op/BriefViewAssets.vue"),
                    "view-rt" : () => import("@/components/main/op/BriefViewSecurity.vue"),
                    "view-rb" : () => import("@/components/main/op/BriefViewTopology.vue"),
                    "view-lm" : () => import("@/components/lab/BlankBriefView.vue"),
                    "view-rm" : () => import("@/components/lab/BlankBriefView.vue")
                }
            },
            {
                path: "/main/mon",
                name: "main-monitor-page",
                components: {
                    "view-lt" : () => import("@/components/main/mon/BriefViewVideo.vue"),
                    "view-lb" : () => import("@/components/main/mon/BriefViewAction.vue"),
                    "view-rt" : () => import("@/components/main/mon/BriefViewStatus.vue"),
                    "view-rb" : () => import("@/components/main/mon/BriefViewElectricity.vue"),
                    "view-lm" : () => import("@/components/lab/BlankBriefView.vue"),
                    "view-rm" : () => import("@/components/lab/BlankBriefView.vue")
                }
            },
            {
                path: "/main/mon/video",
                name: "main-monitor-video-page",
                components: {
                    "view-lt" : () => import("@/components/mon/Index.vue"),
                    "view-lb" : () => import("@/components/main/mon/BriefViewAction.vue"),
                    "view-rt" : () => import("@/components/main/mon/BriefViewStatus.vue"),
                    "view-rb" : () => import("@/components/main/mon/BriefViewElectricity.vue"),
                    "view-lm" : () => import("@/components/lab/BlankBriefView.vue"),
                    "view-rm" : () => import("@/components/lab/BlankBriefView.vue")
                }
            }
        ]
    },
    {
        path: "/mon/video",
        name: "monitor-video-page",
        component: () => import("@/components/mon/Index.vue")
    },
    {
        path: "/mon/video/station",
        name: "monitor-video-station-page",
        component: () => import("@/components/mon/Station.vue")
    },
    {
        path: "/lab",
        component: () => import("@/layout/lab/Layout.vue"),
        children: [
            {
                path: "test",
                name: "test-page",
                component: () => import("@/views/lab/WindowLab.vue"),
            }
        ]
    }
]

const router = createRouter({
    history: createWebHashHistory(),
    routes
})

export default router